package com.ly.sy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ly.sy.entity.Syadmin;
import com.ly.sy.entity.Syuser;
import com.ly.sy.mapper.SyadminMapper;
import com.ly.sy.service.SyadminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liangyu
 * @since 2020-11-11
 */
@Service
public class SyadminServiceImpl extends ServiceImpl<SyadminMapper, Syadmin> implements SyadminService {

    @Override
    public Syadmin findAdminByUnAndpwd(String username, String password) {
        QueryWrapper<Syadmin> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("admin_name",username);
        queryWrapper.eq("admin_pwd",password);
        Syadmin adminFormSql= getOne(queryWrapper);
        return adminFormSql;
    }
}
